﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WeatherStationSys.Interface
{
    /// <summary>
    /// 数据持久化
    /// </summary>
    public interface IPersistent
    {
        /// <summary>
        /// 存储数据
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="name"></param>
        /// <param name="t"></param>
        void Store<T>(string name, T t);

        /// <summary>
        /// 得到对象
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="name"></param>
        /// <returns></returns>
        T Retrieve<T>(string name);

        /// <summary>
        /// 存储的数据
        /// </summary>
        Dictionary<string, string> Dictionary(string regExp);
    }
}
